﻿﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Xml.Serialization;
using Fcdbas.Core;
using Fcdbas.Core.Configuration;
using Fcdbas.Core.DataAccess;

namespace Fcdbas.CodeBuilder.ety
{
    /// <summary>LU=FndDesignLu^PROMPT=Fnd Design Lu^MODULE=FCDBAS^VIEW=FND_DESIGN_LU^PACKAGE=FndDesignLu^</summary>
    [Serializable]
    [DataObject]
    [Description("LU=FndDesignLu^PROMPT=Fnd Design Lu^MODULE=FCDBAS^VIEW=FND_DESIGN_LU^PACKAGE=FndDesignLu^")]
    [BindIndex("PRIMARY", true, "module,lu_name")]
    [BindTable("fnd_design_lu_tab", Description = "LU=FndDesignLu^PROMPT=Fnd Design Lu^MODULE=FCDBAS^VIEW=FND_DESIGN_LU^PACKAGE=FndDesignLu^", ConnName = "", DbType = DatabaseType.MySql)]
    public partial class fnd_design_lu_tab : Ifnd_design_lu_tab
    {
        #region 属性
        private String _module;
        /// <summary>FLAGS=KMI-L^DATATYPE=STRING(10)^PROMPT=Module^</summary>
        [DisplayName("FLAGS=KMI-L^DATATYPE=STRING10^PROMPT=Module^")]
        [Description("FLAGS=KMI-L^DATATYPE=STRING(10)^PROMPT=Module^")]
        [DataObjectField(true, false, false, 10)]
        [BindColumn(1, "module", "FLAGS=KMI-L^DATATYPE=STRING(10)^PROMPT=Module^", null, "varchar(10)", 0, 0, false)]
        public virtual String module
        {
            get { return _module; }
            set { if (OnPropertyChanging(__.module, value)) { _module = value; OnPropertyChanged(__.module); } }
        }

        private String _lu_name;
        /// <summary>FLAGS=AMIU-^DATATYPE=STRING(35)^PROMPT=Lu Name^</summary>
        [DisplayName("FLAGS=AMIU-^DATATYPE=STRING35^PROMPT=LuName^")]
        [Description("FLAGS=AMIU-^DATATYPE=STRING(35)^PROMPT=Lu Name^")]
        [DataObjectField(true, false, false, 35)]
        [BindColumn(2, "lu_name", "FLAGS=AMIU-^DATATYPE=STRING(35)^PROMPT=Lu Name^", null, "varchar(35)", 0, 0, false)]
        public virtual String lu_name
        {
            get { return _lu_name; }
            set { if (OnPropertyChanging(__.lu_name, value)) { _lu_name = value; OnPropertyChanged(__.lu_name); } }
        }

        private String _table_name;
        /// <summary>FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=Table Name^</summary>
        [DisplayName("FLAGS=A-IUL^DATATYPE=STRING40^PROMPT=TableName^")]
        [Description("FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=Table Name^")]
        [DataObjectField(false, false, true, 40)]
        [BindColumn(3, "table_name", "FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=Table Name^", null, "varchar(40)", 0, 0, false)]
        public virtual String table_name
        {
            get { return _table_name; }
            set { if (OnPropertyChanging(__.table_name, value)) { _table_name = value; OnPropertyChanged(__.table_name); } }
        }

        private String _view_name;
        /// <summary>FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=View Name^</summary>
        [DisplayName("FLAGS=A-IUL^DATATYPE=STRING40^PROMPT=ViewName^")]
        [Description("FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=View Name^")]
        [DataObjectField(false, false, true, 40)]
        [BindColumn(4, "view_name", "FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=View Name^", null, "varchar(40)", 0, 0, false)]
        public virtual String view_name
        {
            get { return _view_name; }
            set { if (OnPropertyChanging(__.view_name, value)) { _view_name = value; OnPropertyChanged(__.view_name); } }
        }

        private String _package_name;
        /// <summary>FLAGS=A-IUL^DATATYPE=STRING(35)^PROMPT=Package Name^</summary>
        [DisplayName("FLAGS=A-IUL^DATATYPE=STRING35^PROMPT=PackageName^")]
        [Description("FLAGS=A-IUL^DATATYPE=STRING(35)^PROMPT=Package Name^")]
        [DataObjectField(false, false, true, 35)]
        [BindColumn(5, "package_name", "FLAGS=A-IUL^DATATYPE=STRING(35)^PROMPT=Package Name^", null, "varchar(35)", 0, 0, false)]
        public virtual String package_name
        {
            get { return _package_name; }
            set { if (OnPropertyChanging(__.package_name, value)) { _package_name = value; OnPropertyChanged(__.package_name); } }
        }

        private String _description;
        /// <summary>FLAGS=A-IUL^DATATYPE=STRING(100)^PROMPT=Description^</summary>
        [DisplayName("FLAGS=A-IUL^DATATYPE=STRING100^PROMPT=Description^")]
        [Description("FLAGS=A-IUL^DATATYPE=STRING(100)^PROMPT=Description^")]
        [DataObjectField(false, false, true, 100)]
        [BindColumn(6, "description", "FLAGS=A-IUL^DATATYPE=STRING(100)^PROMPT=Description^", null, "varchar(100)", 0, 0, false)]
        public virtual String description
        {
            get { return _description; }
            set { if (OnPropertyChanging(__.description, value)) { _description = value; OnPropertyChanged(__.description); } }
        }

        private Byte[] _storage_text;
        /// <summary></summary>
        [DisplayName("Text")]
        [Description("")]
        [DataObjectField(false, false, true, 65535)]
        [BindColumn(7, "storage_text", "", null, "blob", 0, 0, false)]
        public virtual Byte[] storage_text
        {
            get { return _storage_text; }
            set { if (OnPropertyChanging(__.storage_text, value)) { _storage_text = value; OnPropertyChanged(__.storage_text); } }
        }

        private Byte[] _logical_text;
        /// <summary></summary>
        [DisplayName("Text1")]
        [Description("")]
        [DataObjectField(false, false, true, 65535)]
        [BindColumn(8, "logical_text", "", null, "blob", 0, 0, false)]
        public virtual Byte[] logical_text
        {
            get { return _logical_text; }
            set { if (OnPropertyChanging(__.logical_text, value)) { _logical_text = value; OnPropertyChanged(__.logical_text); } }
        }

        private String _rowid;
        /// <summary></summary>
        [DisplayName("Rowid")]
        [Description("")]
        [DataObjectField(false, false, false, 50)]
        [BindColumn(9, "rowid", "", null, "varchar(50)", 0, 0, false)]
        public virtual String rowid
        {
            get { return _rowid; }
            set { if (OnPropertyChanging(__.rowid, value)) { _rowid = value; OnPropertyChanged(__.rowid); } }
        }

        private DateTime _rowversion;
        /// <summary></summary>
        [DisplayName("Rowversion")]
        [Description("")]
        [DataObjectField(false, false, false, 0)]
        [BindColumn(10, "rowversion", "", null, "datetime", 0, 0, false)]
        public virtual DateTime rowversion
        {
            get { return _rowversion; }
            set { if (OnPropertyChanging(__.rowversion, value)) { _rowversion = value; OnPropertyChanged(__.rowversion); } }
        }
        #endregion

        #region 获取/设置 字段值
        /// <summary>
        /// 获取/设置 字段值。
        /// 一个索引，基类使用反射实现。
        /// 派生实体类可重写该索引，以避免反射带来的性能损耗
        /// </summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.module : return _module;
                    case __.lu_name : return _lu_name;
                    case __.table_name : return _table_name;
                    case __.view_name : return _view_name;
                    case __.package_name : return _package_name;
                    case __.description : return _description;
                    case __.storage_text : return _storage_text;
                    case __.logical_text : return _logical_text;
                    case __.rowid : return _rowid;
                    case __.rowversion : return _rowversion;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.module : _module = Convert.ToString(value); break;
                    case __.lu_name : _lu_name = Convert.ToString(value); break;
                    case __.table_name : _table_name = Convert.ToString(value); break;
                    case __.view_name : _view_name = Convert.ToString(value); break;
                    case __.package_name : _package_name = Convert.ToString(value); break;
                    case __.description : _description = Convert.ToString(value); break;
                    case __.storage_text : _storage_text = (Byte[])value; break;
                    case __.logical_text : _logical_text = (Byte[])value; break;
                    case __.rowid : _rowid = Convert.ToString(value); break;
                    case __.rowversion : _rowversion = Convert.ToDateTime(value); break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得LU=FndDesignLu^PROMPT=Fnd Design Lu^MODULE=FCDBAS^VIEW=FND_DESIGN_LU^PACKAGE=FndDesignLu^字段信息的快捷方式</summary>
        public class _
        {
            ///<summary>FLAGS=KMI-L^DATATYPE=STRING(10)^PROMPT=Module^</summary>
            public static readonly Field module = FindByName(__.module);

            ///<summary>FLAGS=AMIU-^DATATYPE=STRING(35)^PROMPT=Lu Name^</summary>
            public static readonly Field lu_name = FindByName(__.lu_name);

            ///<summary>FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=Table Name^</summary>
            public static readonly Field table_name = FindByName(__.table_name);

            ///<summary>FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=View Name^</summary>
            public static readonly Field view_name = FindByName(__.view_name);

            ///<summary>FLAGS=A-IUL^DATATYPE=STRING(35)^PROMPT=Package Name^</summary>
            public static readonly Field package_name = FindByName(__.package_name);

            ///<summary>FLAGS=A-IUL^DATATYPE=STRING(100)^PROMPT=Description^</summary>
            public static readonly Field description = FindByName(__.description);

            ///<summary></summary>
            public static readonly Field storage_text = FindByName(__.storage_text);

            ///<summary></summary>
            public static readonly Field logical_text = FindByName(__.logical_text);

            ///<summary></summary>
            public static readonly Field rowid = FindByName(__.rowid);

            ///<summary></summary>
            public static readonly Field rowversion = FindByName(__.rowversion);

            static Field FindByName(String name) { return Meta.Table.FindByName(name); }
        }

        /// <summary>取得LU=FndDesignLu^PROMPT=Fnd Design Lu^MODULE=FCDBAS^VIEW=FND_DESIGN_LU^PACKAGE=FndDesignLu^字段名称的快捷方式</summary>
        class __
        {
            ///<summary>FLAGS=KMI-L^DATATYPE=STRING(10)^PROMPT=Module^</summary>
            public const String module = "module";

            ///<summary>FLAGS=AMIU-^DATATYPE=STRING(35)^PROMPT=Lu Name^</summary>
            public const String lu_name = "lu_name";

            ///<summary>FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=Table Name^</summary>
            public const String table_name = "table_name";

            ///<summary>FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=View Name^</summary>
            public const String view_name = "view_name";

            ///<summary>FLAGS=A-IUL^DATATYPE=STRING(35)^PROMPT=Package Name^</summary>
            public const String package_name = "package_name";

            ///<summary>FLAGS=A-IUL^DATATYPE=STRING(100)^PROMPT=Description^</summary>
            public const String description = "description";

            ///<summary></summary>
            public const String storage_text = "storage_text";

            ///<summary></summary>
            public const String logical_text = "logical_text";

            ///<summary></summary>
            public const String rowid = "rowid";

            ///<summary></summary>
            public const String rowversion = "rowversion";

        }
        #endregion
    }

    /// <summary>LU=FndDesignLu^PROMPT=Fnd Design Lu^MODULE=FCDBAS^VIEW=FND_DESIGN_LU^PACKAGE=FndDesignLu^接口</summary>
    public partial interface Ifnd_design_lu_tab
    {
        #region 属性
        /// <summary>FLAGS=KMI-L^DATATYPE=STRING(10)^PROMPT=Module^</summary>
        String module { get; set; }

        /// <summary>FLAGS=AMIU-^DATATYPE=STRING(35)^PROMPT=Lu Name^</summary>
        String lu_name { get; set; }

        /// <summary>FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=Table Name^</summary>
        String table_name { get; set; }

        /// <summary>FLAGS=A-IUL^DATATYPE=STRING(40)^PROMPT=View Name^</summary>
        String view_name { get; set; }

        /// <summary>FLAGS=A-IUL^DATATYPE=STRING(35)^PROMPT=Package Name^</summary>
        String package_name { get; set; }

        /// <summary>FLAGS=A-IUL^DATATYPE=STRING(100)^PROMPT=Description^</summary>
        String description { get; set; }

        /// <summary></summary>
        Byte[] storage_text { get; set; }

        /// <summary></summary>
        Byte[] logical_text { get; set; }

        /// <summary></summary>
        String rowid { get; set; }

        /// <summary></summary>
        DateTime rowversion { get; set; }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值。</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}